package com.central.scheduler.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.central.db.mapper.SuperMapper;
import com.central.scheduler.dao.model.ProcessInstanceMap;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Tindy
 * @date 2021/11/3
 * @describe
 * process instance map mapper interface
 */
@Mapper
public interface ProcessInstanceMapMapper extends SuperMapper<ProcessInstanceMap> {

    /**
     * query process instance by parentId
     * @param parentProcessId parentProcessId
     * @param parentTaskId parentTaskId
     * @return process instance map
     */
    ProcessInstanceMap queryByParentId(@Param("parentProcessId") Long parentProcessId,
                                       @Param("parentTaskId") Long parentTaskId);


    /**
     * query by sub process id
     * @param subProcessId subProcessId
     * @return process instance map
     */
    ProcessInstanceMap queryBySubProcessId(@Param("subProcessId") Long subProcessId);

}
